package cn.hcbycloud.stream.service;



import cn.hcbycloud.stream.service.channel.DefaultInputChannelProcessor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;

/**
 * @author gaoh
 * @desc
 * @date 2022年02月11日 下午 10:33
 */
@Slf4j
@EnableBinding(DefaultInputChannelProcessor.class)
public class MessageConsumer{

    /**
     * 接收消息
     *
     * @param message
     * @return
     */
    @StreamListener(DefaultInputChannelProcessor.DEFAULT_INPUT)
    public void receiveMessage(Message<String> message) {
        log.info("接收的消息：" + message);
    }
}